import request from '@/utils/request'

export function getRoomList(params) {
  return request({
    url: '/room/list',
    method: 'get',
    params
  })
}

export function getRoomDetail(id) {
  return request({
    url: `/room/${id}`,
    method: 'get'
  })
}

export function addRoom(data) {
  return request({
    url: '/room',
    method: 'post',
    data
  })
}

export function updateRoom(data) {
  return request({
    url: '/room',
    method: 'put',
    data
  })
}

export function deleteRoom(id) {
  return request({
    url: `/room/${id}`,
    method: 'delete'
  })
}
